// 菜单相关ts类型
export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

export interface Permission {
  id?: number // 已有的存在，新增的不存在
  createTime: string
  updateTime: string
  pid: number
  name: string
  code: string
  toCode: string
  type: number
  status: null
  level: number
  children: PermissionList
  select: false
}


export type PermissionList = Permission[]

// 获取全部菜单接口返回的数据类型
export interface PermissionResponseData extends ResponseData {
  data: PermissionList
}

// 添加与修改菜单携带的参数的ts类型
export interface MenuParams {
  id?: number   // ID
  code: string  // 权限数值
  level: number // 几级菜单
  name: string  // 菜单的名称
  pid: number   // 菜单的ID
}